
<style scoped lang="scss">
	
.el-table--medium .el-table__cell {
	padding: 20px 0 !important;
}
	
	
	.el-table .el-table__cell.is-center {
	    text-align: center;
		padding: 20px 0 !important;
	}
td{
	    border: 1px solid #c9c9c9;
	padding: 20px;
}
.el-table .el-table__cell.is-center {
    border: 1px solid #c9c9c9;
    padding: 20px;
}
.el-table th.el-table__cell.is-leaf, .el-table td.el-table__cell {
    border: 1px solid #dfe6ec;
}
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>


<template>
  <div class="app-container">
	<el-table  :data="roleList1"style="margin-top: 30px;    margin-left: 2%;
    width: 96%;   text-align: center;   border: 1px solid #c9c9c9;  border-collapse: collapse;" >
		 <el-table-column label="序号"  align="center" type="index" :index="indexMethod"  />
		 <el-table-column label="部门" prop="tool" align="center"  >
		 </el-table-column>
			<div v-for="(item, key) in roleList1[0]" :key="item.tool">
			  <el-table-column :label="key" :prop="key"   v-if="key !='tool'" align="center" fixed="right"  >
			  </el-table-column>
	       </div>
		   
	  </el-table>
  </div>
</template>
<script>
import {getTongjiRow1, getTongjiRow2 } from "@/api/ftwol/tongji";
export default {
  name: "Role",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      roleList1: [],
	  roleList2: [],
    };
  },
  created() {
     this.createEcharts1();
	 this.createEcharts2();
  },
  methods: {
	   indexMethod(index){
	          return (index + 1)
	      },
	
    /** 查询角色列表 */
   createEcharts1() {
	 getTongjiRow1().then(response => {
		 const objectArray = response.data.map(item => ({ ...item }));
		 this.roleList1 = objectArray;
		 console.log(objectArray)
	   } 
	 );
   },
   createEcharts2() {
   	 getTongjiRow2().then(response => {
		 console.log(this.roleList1)
		 for (var i = 0; i < this.roleList1.length; i++) {
		 	
		 }
   	   //this.roleList1 = response.data;
   	   } 
   	 );
   },
  }
};
</script>
